The present invention relates to the field of YUV color space conversion from planar YUV 4:2:0 format to packed 4:2:2 YUV format and packed 4:2:2 YUV format to planar YUV 4:2:0 format.
Conversion of digital data from planar YUV 4:2:0 format to packed YUV 4:2:2 format has been performed for graphics generation and digital video processing since packed YUV 4:2:2 format provides a more detailed, richer display. Conversely, digital playback has typically been performed in a planar YUV 4:2:0 format which is a more compact format requiring less bandwidth.
4:2:0 color space data is stored in a planar format, that is, in three contiguous locations, or surfaces, of memory. Therefore, in order to convert YUV color space from 4:2:0 to 4:2:2, it has been necessary to read all three surfaces, for the Y, U and V components respectively, convert the data and write the data in the converted format. Such processing incurs high overhead, in terms of address generation capabilities, buffering capacities, and data paths/streams to and from a memory. Furthermore, for the conversion of YUV 4:2:2 packed format data to the YUV 4:2:0 planar format, the converted data is required to be written to the three separate, memory locations which also requires additional buffering capabilities and data paths/streams to and from the memory.
Therefore, there exists a need for a simpler and less expensive technique for performing color conversions.
According to an embodiment of the present invention, a method and circuit are provided for color space conversion of YUV (luminance and chrominance) components, including the steps of reading source data, sampling said YUV samples in a vertical direction, performing a pass for each of said Y, U and V components, and writing said YUV components in the converted format.